﻿using Mes.Domain.BoundedContext.EntityBase;

namespace Mes.Domain.BoundedContext.Entities.Operations
{
    public class OperEntLink : NoIdEntityBase
    {
        public OperEntLink() { }
        public OperEntLink(string processId, string operId, int entId, double? estTransferTime, double? estLabRate, double? estSetupTime, double? estTeardownTime,
            double estProdRate, DateTime lastEditAt)
        {
            Process_Id = processId;
            Oper_Id = operId;
            Ent_Id = entId;
            Est_Transfer_Time = estTransferTime;
            Est_Lab_Rate = estLabRate;
            Est_Setup_Time = estSetupTime;
            Est_Teardown_Time = estTeardownTime;
            Est_Prod_Rate = estProdRate;
            Last_Edit_At = lastEditAt;
        }
        public string Process_Id { get; set; } = string.Empty;

        public string Oper_Id { get; set; } = string.Empty;

        public int Ent_Id { get; set; } = 0;

        public double? Est_Fixed_Lab { get; set; } = null;

        public double? Est_Lab_Rate { get; set; } = null;

        public double? Est_Setup_Time { get; set; } = null;

        public double? Est_Teardown_Time { get; set; } = null;

        public double Est_Prod_Rate { get; set; } = 0.0;

        public int Prod_Uom { get; set; } = 0;

        public double Batch_Size { get; set; } = 0.0;

        public double? Est_Transfer_Time { get; set; } = null;

        public double? Init_Prod_Pct { get; set; } = null;

        public bool Parent_Contingent_Ent { get; set; } = false;

        public bool Child_Contingent_Ent { get; set; } = false;

        public string? Last_Edit_Comment { get; set; } = null;

        public string? Last_Edit_By { get; set; } = null;

        public DateTime Last_Edit_At { get; set; } = DateTime.Now;

        public long Mod_Id { get; set; } = 0;

        public int Row_Id { get; set; } = 0;
    }
}
